package com.base.service;

import com.base.po.voip.SelfShop;
import com.base.po.voip.SelfShopExample;
import com.base.utils.Page;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface SelfShopService {
    int countByExample(SelfShopExample example);

    int deleteByExample(SelfShopExample example);

    int insert(SelfShop record);

    int insertSelective(SelfShop record);

    List<SelfShop> selectByExample(SelfShopExample example);

    SelfShop selectByPrimaryKey(String id);

    List<SelfShop> selectBySelfShop(@Param("parentid") String parentid, @Param("shopid") String shopid);

    List<SelfShop> selectAll(@Param("page") Page page, @Param("parentid") String parentid,
                             @Param("shopname") String shopname, @Param("isopen") Byte isopen);

    List<SelfShop> selectAllShop(@Param("page") Page page, @Param("parentid") String parentid, @Param("cid") String cid,
                                 @Param("shopname") String shopname, @Param("ischoice") Byte ischoice,
                                 @Param("start") String start, @Param("end") String end, @Param("sort") Boolean sort,
                                 @Param("city") String city, @Param("district") String district);

    List<SelfShop> selectByNearby(@Param("parentid") String parentid, @Param("cid") String cid,
                                  @Param("latitude") BigDecimal latitude, @Param("longitude") BigDecimal longitude,
                                  @Param("sort") Boolean sort, @Param("distanceStart") Integer distanceStart,
                                  @Param("distanceEnd") Integer distanceEnd);

    int updateByExampleSelective(@Param("record") SelfShop record, @Param("example") SelfShopExample example);

    int updateByExample(@Param("record") SelfShop record, @Param("example") SelfShopExample example);

    int updateByPrimaryKeySelective(SelfShop record);

    int countSort(@Param("parentid") String parentid);

    int countAll(@Param("parentid") String parentid, @Param("shopname") String shopname,
                 @Param("isopen") Byte isopen);

    int countAllShop(@Param("parentid") String parentid, @Param("cid") String cid,
                     @Param("shopname") String shopname, @Param("ischoice") Byte ischoice,
                     @Param("start") String start, @Param("end") String end,
                     @Param("sort") Boolean sort, @Param("city") String city,
                     @Param("district") String district);

    SelfShop selectByName(String selfShopName);
}